<html>
<body>
Reports a <code>try-finally</code> block with <code>resource.close()</code> in <code>finally</code> which can be converted to a <code>resource.use()</code> call.
<p><code>use()</code> is easier to read and less error-prone as there is no need in explicit <code>close()</code> call.</p>
<p><b>Example:</b></p>
<pre><code>
  fun example() {
      val reader = File("file.txt").bufferedReader()
      try {
          reader.lineSequence().forEach(::print)
      } finally {
          reader.close()
      }
  }
</code></pre>
<p>After the quick-fix applied:</p>
<pre><code>
  fun example() {
      File("file.txt").bufferedReader().use { reader ->
          reader.lineSequence().forEach(::print)
      }
  }
</code></pre>
<!-- tooltip end -->
</body>
</html>